3.302 \(\int \frac{\cot (c+d x) (a B+b B \tan (c+d x))}{a+b \tan (c+d x)} \, dx\)

Optimal. Leaf size=12 \[ \frac{B \log (\sin (c+d x))}{d} \]

[Out]

(B*Log[Sin[c + d*x]])/d

________________________________________________________________________________________

Rubi [A]  time = 0.0066853, antiderivative size = 12, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 2, integrand size = 32, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.062, Rules used = {21, 3475} \[ \frac{B \log (\sin (c+d x))}{d} \]

Antiderivative was successfully verified.

[In]

Int[(Cot[c + d*x]*(a*B + b*B*Tan[c + d*x]))/(a + b*Tan[c + d*x]),x]

[Out]

(B*Log[Sin[c + d*x]])/d

Rule 21

Int[(u_.)*((a_) + (b_.)*(v_))^(m_.)*((c_) + (d_.)*(v_))^(n_.), x_Symbol] :> Dist[(b/d)^m, Int[u*(c + d*v)^(m +
 n), x], x] /; FreeQ[{a, b, c, d, n}, x] && EqQ[b*c - a*d, 0] && IntegerQ[m] && ( !IntegerQ[n] || SimplerQ[c +
 d*x, a + b*x])

Rule 3475

Int[tan[(c_.) + (d_.)*(x_)], x_Symbol] :> -Simp[Log[RemoveContent[Cos[c + d*x], x]]/d, x] /; FreeQ[{c, d}, x]

Rubi steps

\begin{align*} \int \frac{\cot (c+d x) (a B+b B \tan (c+d x))}{a+b \tan (c+d x)} \, dx &=B \int \cot (c+d x) \, dx\\ &=\frac{B \log (\sin (c+d x))}{d}\\ \end{align*}

Mathematica [A]  time = 0.0106897, size = 20, normalized size = 1.67 \[ \frac{B (\log (\tan (c+d x))+\log (\cos (c+d x)))}{d} \]

Antiderivative was successfully verified.

[In]

Integrate[(Cot[c + d*x]*(a*B + b*B*Tan[c + d*x]))/(a + b*Tan[c + d*x]),x]

[Out]

(B*(Log[Cos[c + d*x]] + Log[Tan[c + d*x]]))/d

________________________________________________________________________________________

Maple [A]  time = 0.044, size = 13, normalized size = 1.1 \begin{align*}{\frac{B\ln \left ( \sin \left ( dx+c \right ) \right ) }{d}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cot(d*x+c)*(a*B+b*B*tan(d*x+c))/(a+b*tan(d*x+c)),x)

[Out]

B*ln(sin(d*x+c))/d

________________________________________________________________________________________

Maxima [B]  time = 1.69498, size = 39, normalized size = 3.25 \begin{align*} -\frac{B \log \left (\tan \left (d x + c\right )^{2} + 1\right ) - 2 \, B \log \left (\tan \left (d x + c\right )\right )}{2 \, d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(d*x+c)*(a*B+b*B*tan(d*x+c))/(a+b*tan(d*x+c)),x, algorithm="maxima")

[Out]

-1/2*(B*log(tan(d*x + c)^2 + 1) - 2*B*log(tan(d*x + c)))/d

________________________________________________________________________________________

Fricas [A]  time = 2.05819, size = 57, normalized size = 4.75 \begin{align*} \frac{B \log \left (-\frac{1}{2} \, \cos \left (2 \, d x + 2 \, c\right ) + \frac{1}{2}\right )}{2 \, d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(d*x+c)*(a*B+b*B*tan(d*x+c))/(a+b*tan(d*x+c)),x, algorithm="fricas")

[Out]

1/2*B*log(-1/2*cos(2*d*x + 2*c) + 1/2)/d

________________________________________________________________________________________

Sympy [A]  time = 1.18723, size = 49, normalized size = 4.08 \begin{align*} \begin{cases} - \frac{B \log{\left (\tan ^{2}{\left (c + d x \right )} + 1 \right )}}{2 d} + \frac{B \log{\left (\tan{\left (c + d x \right )} \right )}}{d} & \text{for}\: d \neq 0 \\\frac{x \left (B a + B b \tan{\left (c \right )}\right ) \cot{\left (c \right )}}{a + b \tan{\left (c \right )}} & \text{otherwise} \end{cases} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(d*x+c)*(a*B+b*B*tan(d*x+c))/(a+b*tan(d*x+c)),x)

[Out]

Piecewise((-B*log(tan(c + d*x)**2 + 1)/(2*d) + B*log(tan(c + d*x))/d, Ne(d, 0)), (x*(B*a + B*b*tan(c))*cot(c)/
(a + b*tan(c)), True))

________________________________________________________________________________________

Giac [B]  time = 1.27845, size = 80, normalized size = 6.67 \begin{align*} \frac{B \log \left (\frac{{\left | -\cos \left (d x + c\right ) + 1 \right |}}{{\left | \cos \left (d x + c\right ) + 1 \right |}}\right ) - 2 \, B \log \left ({\left | -\frac{\cos \left (d x + c\right ) - 1}{\cos \left (d x + c\right ) + 1} + 1 \right |}\right )}{2 \, d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(d*x+c)*(a*B+b*B*tan(d*x+c))/(a+b*tan(d*x+c)),x, algorithm="giac")

[Out]

1/2*(B*log(abs(-cos(d*x + c) + 1)/abs(cos(d*x + c) + 1)) - 2*B*log(abs(-(cos(d*x + c) - 1)/(cos(d*x + c) + 1)
+ 1)))/d